//package com.zbkj.crmeb.task.tools;
//
//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
//import com.utils.DateUtil;
//import com.xxl.job.core.handler.annotation.XxlJob;
//import com.zbkj.crmeb.store.model.StoreProductActive;
//import com.zbkj.crmeb.store.service.StoreSaleAnalysisService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.scheduling.annotation.EnableScheduling;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
///**
// * 定时清除活跃商品表数据
// * @author duyb
// * @date:  2022-10-19
// */
//@Slf4j
//@Component
//@Configuration
//@EnableScheduling
//public class ActiveProductInfoTask {
//
//    @Autowired
//    StoreSaleAnalysisService storeSaleAnalysisService;
//
//    /**
//     * 每天凌晨1点执行
//     */
//    @XxlJob("deleteActiveProductInfoTask")
//    public void deleteActiveProductInfo(){
//        try {
//            storeSaleAnalysisService.remove(Wrappers.<StoreProductActive>lambdaQuery()
//                    .lt(StoreProductActive::getStatisticsDate, DateUtil.getDaysAgo(120)));
//        }catch (Exception e){
//            log.error("deleteActiveProductInfo.task error ! e: " ,e);
//        }
//    }
//
//}
